import React from 'react';
import styled from 'styled-components';

const Input = styled.input`
  border: none;
  background: none;
`;

type Props = {
  value: string;
  today: string;
  onChange: (newValue: string) => void
}

const DateInput: React.FC<Props> = (props) => {

  return (
    <Input type="date" value={props.value} max={props.today} onChange={(e) => {props.onChange(e.target.value);}}/>

  );
};
export {DateInput};